#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include "pagecontroller.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWidget;
}
QT_END_NAMESPACE

class MainWidget : public QWidget
{
    Q_OBJECT

public:
    MainWidget(QWidget *parent = nullptr);
    ~MainWidget();

    void init();
    void initStyleSheets();
    void initMainWidget();
    void initBodyLeft();

    void mousePressEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    bool _isDraging = false;
    QPoint _dragPosition;

private slots:
    void on_mainwidget_pushbutton_close_clicked();

    void on_mainwidget_pushbutton_upload_clicked();

    void on_mainwidget_head_search_returnPressed();

private:
    PageController *_page_controller;
    QString _defaultPageId = "";

    QWidget* _container = nullptr;

    Ui::MainWidget *ui;
};
#endif // MAINWIDGET_H
